-- GENERATED SPELL FOR [Gruklash] --


function spell0_8979(pUnit, Event) --@Backhand,n/a--
pUnit:FullCastSpellOnTarget(6253,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8979', 2269, 1)
end

function spell1_8979(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_8979', 581, 1)
end

function spell2_8979(pUnit, Event) --@Pummel,n/a--
pUnit:FullCastSpellOnTarget(12555,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8979', 5333, 1)
end

function Sorts_8979(pUnit, Event)
local choix_sorts_8979 = math.random(0, 2)
if choix_sorts_8979 == 0 then
pUnit:RegisterEvent('spell0_8979', 1, 1)
end
if choix_sorts_8979 == 1 then
pUnit:RegisterEvent('spell1_8979', 1, 1)
end
if choix_sorts_8979 == 2 then
pUnit:RegisterEvent('spell2_8979', 1, 1)
end
end

function mob8979_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8979', math.random(1500, 3000), 1)
end

function mob8979_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8979_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8979_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8979, 1, 'mob8979_Action')
RegisterUnitEvent(8979, 2, 'mob8979_Leave')
RegisterUnitEvent(8979, 3, 'mob8979_Kill')
RegisterUnitEvent(8979, 4, 'mob8979_Die')
